package io.github.yotta.common.api.model;

import io.github.yotta.common.api.exception.BaseErrorCode;
import io.github.yotta.common.utils.param.ParamUtil;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Set;

/**
 * @author yotta
 * @date 2023/3/14 7:52
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class IdsRequest extends ApiRequest {

    private Set<Long> ids;

    @Override
    public void checkValid() {
        ParamUtil.notEmpty(this.ids, BaseErrorCode.ID_IS_NULL.getCode());
    }
}
